package com.xltt.vehicleControl.bean;


import java.io.Serializable;

public class BaseResult<T> extends BaseResponse implements Serializable {

    public String message;

    String hint;

    String sessionId;

    boolean success;

    private T data;

    public BaseResult() {
    }

    public BaseResult(int code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public boolean isSuccess() {
        return 1000 == code || 200 == code;
    }

    public String getMessage() {
        return message;
    }

    public String getHint() {
        return hint;
    }

    public void setHint(String hint) {
        this.hint = hint;
    }

    public String getSessionId() {
        return sessionId;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    @Override
    public String toString() {
        return "BaseResult{" +
                "message='" + message + '\'' +
                ", hint='" + hint + '\'' +
                ", sessionId='" + sessionId + '\'' +
                ", success=" + success +
                ", data=" + data +
                ", code=" + code +
                '}';
    }
}
